home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / X11 / config / sv4Lib.rules < prev    next >
Text File  |  2006-04-12  |  6KB  |  176 lines

  1. XCOMM $Xorg: sv4Lib.rules,v 1.3 2000/08/17 19:41:48 cpqbld Exp $
  2.  
  3. /*
  4.  * SVR4 shared library rules
  5.  */
  6.  
  7. XCOMM $XFree86: xc/config/cf/sv4Lib.rules,v 3.8tsi Exp $
  8.  
  9. #ifndef HasSharedLibraries
  10. # define HasSharedLibraries YES
  11. #endif
  12. #ifndef SharedDataSeparation
  13. # define SharedDataSeparation NO
  14. #endif
  15. #ifndef HasGcc2ForCplusplus
  16. # define HasGcc2ForCplusplus HasGcc2
  17. #endif
  18. #ifndef SharedCodeDef
  19. # define SharedCodeDef /**/
  20. #endif
  21. #ifndef SharedLibraryDef
  22. # define SharedLibraryDef /**/
  23. #endif
  24. #ifndef ShLibIncludeFile
  25. # define ShLibIncludeFile <sv4Lib.tmpl>
  26. #endif
  27. #ifndef SharedLibraryLdCmd
  28. # define SharedLibraryLdCmd $(LD)
  29. #endif
  30. #ifndef SharedLibraryLoadFlags
  31. # define SharedLibraryLoadFlags -G -z text
  32. #endif
  33. #ifndef PositionIndependentCFlags
  34. # if HasGcc2
  35. #  define PositionIndependentCFlags -fPIC
  36. # else
  37. #  define PositionIndependentCFlags -K PIC
  38. # endif
  39. #endif
  40. #ifndef PositionIndependentCplusplusFlags
  41. # if HasGcc2ForCplusplus
  42. #  define PositionIndependentCplusplusFlags -fPIC
  43. # else
  44. #  define PositionIndependentCplusplusFlags -K PIC
  45. # endif
  46. #endif
  47. #ifndef UseExportLists
  48. # define UseExportLists NO
  49. #endif
  50. #ifndef StripInstalledPrograms
  51. # define StripInstalledPrograms NO
  52. #endif
  53.  
  54. /*
  55.  * InstallSharedLibrary - generate rules to install the shared library.
  56.  */
  57. #ifndef InstallSharedLibrary
  58. #if StripInstalledPrograms
  59. # define InstallSharedLibrary(libname,rev,dest)                @@\
  60. install:: Concat(lib,libname.so.rev)                     @@\
  61.     MakeDir($(DESTDIR)dest)                        @@\
  62.     $(INSTALL) $(INSTALLFLAGS) $(INSTLIBFLAGS) Concat(lib,libname.so.rev) $(DESTDIR)dest @@\
  63.     mcs -d Concat($(DESTDIR)dest/lib,libname.so.rev)        @@\
  64.     @if $(SOSYMLINK); then (set -x; \                @@\
  65.       $(RM) Concat($(DESTDIR)dest/lib,libname.so); \        @@\
  66.       cd $(DESTDIR)dest; \                        @@\
  67.       $(LN) Concat(lib,libname.so.rev) Concat(lib,libname.so)); fi
  68. #else
  69. # define InstallSharedLibrary(libname,rev,dest)                @@\
  70. install:: Concat(lib,libname.so.rev)                     @@\
  71.     MakeDir($(DESTDIR)dest)                        @@\
  72.     $(INSTALL) $(INSTALLFLAGS) $(INSTLIBFLAGS) Concat(lib,libname.so.rev) $(DESTDIR)dest @@\
  73.     @if $(SOSYMLINK); then (set -x; \                @@\
  74.       $(RM) Concat($(DESTDIR)dest/lib,libname.so); \        @@\
  75.       cd $(DESTDIR)dest; \                        @@\
  76.       $(LN) Concat(lib,libname.so.rev) Concat(lib,libname.so)); fi
  77. #endif
  78.  
  79. #endif /* InstallSharedLibrary */
  80.  
  81. /*
  82.  * InstallSharedLibraryData - generate rules to install the shared library data
  83.  */
  84. #ifndef InstallSharedLibraryData
  85. # define InstallSharedLibraryData(libname,rev,dest)
  86. #endif /* InstallSharedLibraryData */
  87.  
  88. #ifndef LinkWithExports
  89. # if UseExportLists
  90. #  define LinkWithExports(libname,rev,solist,down,up) \
  91.     (cd down; $(CCENVSETUP) SharedLibraryLdCmd -o up/$@~ $(SHLIBLDFLAGS) -h $@ solist $(REQUIREDLIBS))    @@\
  92.     if [ -f Concat(lib,libname.elist) ]; then \            @@\
  93.         $(RM) down/$@.exports $@.list; \                @@\
  94.         $(CPP) $(ALLINCLUDES) $(EXTRA_DEFINES) $(PROTO_DEFINES) $(THREADS_DEFINES) $(DEFINES) Concat(lib,libname.elist) | CppSedMagic >$@.list; \    @@\
  95.         $(EXPORTLISTGEN) $@~ $@.list > down/$@.exports; \        @@\
  96.         (cd down; $(CCENVSETUP) SharedLibraryLdCmd -o up/$@~ $(SHLIBLDFLAGS) -h $@ ShlibExportListOpt($@.exports) solist $(REQUIREDLIBS)); \    @@\
  97.         $(RM) down/$@.exports $@.list; \                @@\
  98.     fi;
  99. # else
  100. #  define LinkWithExports(libname,rev,solist,down,up) \
  101.     (cd down; $(CCENVSETUP) SharedLibraryLdCmd -o up/$@~ $(SHLIBLDFLAGS) -h $@ solist $(REQUIREDLIBS))
  102. # endif
  103. #endif
  104.  
  105. /*
  106.  * SharedLibraryTarget - generate rules to create a shared library;
  107.  * build it into a different name so that we do not hose people by having
  108.  * the library gone for long periods.
  109.  */
  110. #ifndef SharedLibraryTarget
  111. # define SharedLibraryTarget(libname,rev,solist,down,up)        @@\
  112. AllTarget(Concat(lib,libname.so.rev))                    @@\
  113.                                     @@\
  114. Concat(lib,libname.so.rev):  solist $(EXTRALIBRARYDEPS)            @@\
  115.     $(RM) $@~                            @@\
  116.     LinkWithExports(libname,rev,solist,down,up)            @@\
  117.     $(RM) $@                             @@\
  118.     $(MV) $@~ $@                            @@\
  119.     @if $(SOSYMLINK); then (set -x; \                @@\
  120.       $(RM) Concat(lib,libname.so); \                @@\
  121.       $(LN) $@ Concat(lib,libname.so)); fi                @@\
  122.     LinkBuildLibrary($@)                        @@\
  123.     LinkBuildLibraryMaybe(Concat(lib,libname.so),$(SOSYMLINK))    @@\
  124.                                     @@\
  125. clean::                                    @@\
  126.     $(RM) Concat(lib,libname.so.rev) Concat(lib,libname.so)
  127.  
  128. #endif /* SharedLibraryTarget */
  129.  
  130. /*
  131.  * SharedDepLibraryTarget - generate rules to create a shared library.
  132.  */
  133. #ifndef SharedDepLibraryTarget
  134. # define SharedDepLibraryTarget(libname,rev,deplist,solist,down,up)    @@\
  135. AllTarget(Concat(lib,libname.so.rev))                    @@\
  136.                                     @@\
  137. Concat(lib,libname.so.rev):  deplist $(EXTRALIBRARYDEPS)        @@\
  138.     $(RM) $@~                            @@\
  139.     LinkWithExports(libname,rev,solist,down,up)            @@\
  140.     $(RM) $@                             @@\
  141.     $(MV) $@~ $@                            @@\
  142.     @if $(SOSYMLINK); then (set -x; \                @@\
  143.       $(RM) Concat(lib,libname.so); \                @@\
  144.       $(LN) $@ Concat(lib,libname.so)); fi                @@\
  145.     LinkBuildLibrary($@)                        @@\
  146.     LinkBuildLibraryMaybe(Concat(lib,libname.so),$(SOSYMLINK))    @@\
  147.                                     @@\
  148. clean::                                    @@\
  149.     $(RM) Concat(lib,libname.so.rev) Concat(lib,libname.so)
  150.  
  151. #endif /* SharedDepLibraryTarget */
  152.  
  153.  
  154. #ifndef SharedDepModuleTarget
  155. #define SharedDepModuleTarget(name,deps,solist)                @@\
  156. AllTarget(name)                                @@\
  157.                                     @@\
  158. name: deps                                @@\
  159.     $(RM) $@~                            @@\
  160.     SharedLibraryLdCmd -o $@~ $(SHLIBLDFLAGS) solist $(REQUIREDLIBS) @@\
  161.     $(RM) $@                            @@\
  162.     $(MV) $@~ $@                            @@\
  163.                                     @@\
  164. clean::                                    @@\
  165.     $(RM) name
  166.  
  167. #endif /* SharedDepModuleTarget */
  168.  
  169.  
  170. /*
  171.  * SharedLibraryDataTarget - generate rules to create shlib data file;
  172.  */
  173. #ifndef SharedLibraryDataTarget
  174. # define SharedLibraryDataTarget(libname,rev,salist)
  175. #endif /* SharedLibraryTarget */
  176.